// ignore_for_file: non_constant_identifier_names
library hk_base;

// TODO 导出公共引用的文件
export 'package:flutter/material.dart';
export 'package:hk_base/format_util.dart';
export 'package:hk_base/hk_utils.dart';
export 'package:hk_base/date_util.dart';
export 'package:hk_base/adapter.dart';
export 'package:hk_base/hk_log.dart';
export 'package:hk_base/toast.dart';
export 'package:hk_base/extension.dart';
export 'package:hk_base/view_util.dart';
export 'package:hk_base/hk_cache.dart';
export 'package:hk_base/hk_scroll_view.dart';
export 'package:hk_base/components/button/hk_button.dart';
export 'package:hk_base/components/image/hk_image.dart';
export 'package:hk_base/components/dialog/general_dialog.dart';
export 'package:hk_base/image_enum.dart';
export 'package:shared_preferences/shared_preferences.dart';
export 'package:cached_network_image/cached_network_image.dart';
export 'package:flutter_screenutil/flutter_screenutil.dart';


import 'package:flutter/cupertino.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:oktoast/oktoast.dart';

HkInit({
  Size designSize = const Size(750, 1334),
  ScreenUtilInitBuilder? builder,
  EdgeInsets? toastTextPadding =
      const EdgeInsets.only(left: 20, right: 20, top: 10, bottom: 10),
  double? toastRadius = 12,
  bool hasScreenUtil = true, //是否已使用ScreenUtil插件
  Widget? child, //已使用ScreenUtil插件，此配置不能为空
}) {
  return OKToast(
    child: hasScreenUtil == false
        ? child ?? const SizedBox()
        : ScreenUtilInit(
            designSize: designSize,
            minTextAdapt: true,
            splitScreenMode: true,
            builder: builder ??
                (context, child) {
                  return const SizedBox();
                }),
    textPadding: toastTextPadding!,
    radius: toastRadius!,
  );
}
